package zjt.IO1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class demo2 {
    public static void main(String[] args) {
        FileInputStream fileInputStream = null;
        try {
            fileInputStream = new FileInputStream("D:\\itcast\\文档.txt");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        byte[] bb = new byte[3];
            int len;
        try {
            while((len=fileInputStream.read(bb))!=-1) {
                System.out.print(new String(bb,0,len));
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
